home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / MPW Related / MPW Interfaces / CIncludes / FixMath.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-17  |  1.1 KB  |  70 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        FixMath.h
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. */
  11.  
  12. #ifndef __FIXMATH__
  13. #define __FIXMATH__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. #endif
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. pascal Fract Fix2Frac(Fixed x)
  23.     = 0xA841;
  24. pascal long Fix2Long(Fixed x)
  25.     = 0xA840;
  26. pascal Fixed FixATan2(long x,long y)
  27.     = 0xA818;
  28. pascal Fixed Long2Fix(long x)
  29.     = 0xA83F;
  30. pascal Fixed Frac2Fix(Fract x)
  31.     = 0xA842;
  32.     
  33. #ifdef mc68881
  34.  
  35. pascal extended Frac2X(Fract x);
  36. pascal extended Fix2X(Fixed x); 
  37. pascal Fixed X2Fix(extended x); 
  38. pascal Fract X2Frac(extended x);
  39.  
  40. #else
  41.  
  42. pascal extended Frac2X(Fract x)
  43.     = 0xA845;
  44. pascal extended Fix2X(Fixed x)
  45.     = 0xA843; 
  46. pascal Fixed X2Fix(extended x)
  47.     = 0xA844; 
  48. pascal Fract X2Frac(extended x)
  49.     = 0xA846;
  50.  
  51. #endif
  52.  
  53. pascal Fract FracMul(Fract x,Fract y)
  54.     = 0xA84A;
  55. pascal Fixed FixDiv(Fixed x,Fixed y)
  56.     = 0xA84D;
  57. pascal Fract FracDiv(Fract x,Fract y)
  58.     = 0xA84B;
  59. pascal Fract FracSqrt(Fract x)
  60.     = 0xA849;
  61. pascal Fract FracSin(Fixed x)
  62.     = 0xA848;
  63. pascal Fract FracCos(Fixed x)
  64.     = 0xA847;
  65. #ifdef __cplusplus
  66. }
  67. #endif
  68.  
  69. #endif
  70.